-- GENERATED SPELL FOR [Legashi Hellcaller] --


function spell0_6202(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6202', 3000, 1)
end

function spell1_6202(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(11990,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6202', 9000, 1)
end

function Sorts_6202(pUnit, Event)
local choix_sorts_6202 = math.random(0, 1)
if choix_sorts_6202 == 0 then
pUnit:RegisterEvent('spell0_6202', 1, 1)
end
if choix_sorts_6202 == 1 then
pUnit:RegisterEvent('spell1_6202', 1, 1)
end
end

function mob6202_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6202', math.random(1500, 3000), 1)
end

function mob6202_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6202_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6202_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6202, 1, 'mob6202_Action')
RegisterUnitEvent(6202, 2, 'mob6202_Leave')
RegisterUnitEvent(6202, 3, 'mob6202_Kill')
RegisterUnitEvent(6202, 4, 'mob6202_Die')
